export function App() {
  // 函数定义
  function clickHandler1(e) {
    console.log('clickHandler1', e);
  }

  // 箭头函数
  const clickHandler2 = (e) => {
    console.log('clickHandler2', e);
  };
  const clickHandler3 = function (e) {
    console.log('clickHandler3', e);
  };
  return (
    <div>
      <h1>事件绑定</h1>
      <button onClick={(e) => console.log('行内箭头函数', e)}>按钮</button>
      <button onClick={clickHandler1}>按钮1</button>
      <button onClick={clickHandler2}>按钮2</button>
      <button onClick={clickHandler3}>按钮3</button>
    </div>
  );
}
